package com.hdu.dwh.dtos;

import com.hdu.dwh.constants.ParamConstants;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.util.List;

@Data
public class SubjectTableDto {

    private static final long serialVersionUID = 1L;

    /**
     * 数据表名
     */
    @NotNull
    private String tableName;

    /**
     * 数据库ID
     */
    @NotNull
    private Long databaseId;

    /**
     * 层次（0-ODS层，1-DWD层，2-DWS层，3-ADS层，4-DIM层）
     */
    @NotNull
    private Integer hierarchy;

    /**
     * 描述
     */
    private String description;

    /**
     * 源表id
     */
//    @NotNull
//    @NotEmpty
    private List<Long> sourceTableIds;

    public boolean checkParam() {
        return hierarchy.equals(ParamConstants.DWS) || hierarchy.equals(ParamConstants.ADS);
    }
}
